package com.duanjw.springcloud.provider.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;


/**
 * 提供者 controller
 *
 * @author duanjw
 */
@RestController
public class ProviderController {

    private static final Logger log = LoggerFactory.getLogger(ProviderController.class);

    /**
     * echo
     * <p>
     * 请求地址：curl localhost:7003/echo/ZhangSan
     *
     * @param value
     * @return
     */
    @GetMapping("echo/{value}")
    public String echo(@PathVariable String value) {
        log.info("provider 收到的请求参数：{}", value);
        return "Hello " + value;
    }
}